package com.qiaofang.repository;

import com.qiaofang.entity.PremisesRelation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PremisesRelationRepository extends JpaRepository<PremisesRelation, Long> {
    @Query(value = "from PremisesRelation p where p.delFlag = '0' and p.premisesId = :premisesId")
    List<PremisesRelation> getPremisesRelationByPremisesId(@Param(value = "premisesId") Long premisesId);
}
